package com.ysz.globalexception.components;

import lombok.Builder;
import lombok.Data;

/**
 * @ClassName BaseException
 * @Description TODO
 * @Data 13:12
 * @Version 1.0
 * @Author ysz
 */
@Data
@Builder
public class BaseException extends Exception {
    private Integer code;
    private String msg;

    public BaseException(Throwable cause, Integer code, String msg) {
        super(msg, cause);
        this.code = code;
        this.msg = msg;
    }

    public BaseException(Integer code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }
}
